﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace DomainModel.Configuration
{
    internal class SLYDataSection : ConfigurationSection
    {
        private static SLYDataSection s_instance;

        internal static SLYDataSection Instance
        {
            get
            {
                if (s_instance == null)
                {
                    lock (typeof(SLYDataSection))
                    {
                        if (s_instance == null)
                        {
                            s_instance = (SLYDataSection)ConfigurationManager.GetSection("SLYDataSection");
                        }
                    }
                }
                return s_instance;
            }
        }

        [ConfigurationProperty("defaultDataConnectionString", IsRequired = true)]
        public string DefaultDataConnectionString
        {
            get
            {
                return (string)this["defaultDataConnectionString"];
            }
        }
    }
}
